let Koa=require("koa");
let router=require("koa-router")();
let static=require("koa-static");
let app=new Koa();
app.use(static(__dirname+"/css"));
app.listen(3000);
router.get("/",async ctx=>{
    ctx.body=`<!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <link rel="stylesheet" href="css.css">
    </head>
    <body>
        <a href="/">首页</a>
        <a href="doc">doc</a>
        <p class="shou">我是首页</p>
    </body>
    </html>`
})
router.get("/doc",async ctx=>{
    ctx.body=`<!DOCTYPE html>
    <html lang="en">
    <head>  
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <link rel="stylesheet" href="css.css">
    </head>
    <body>
        <a href="/">首页</a>
        <a href="doc">doc</a>
        <p class="doc">我是doc页</p>
    </body>
    </html>`
})
app.use(router.routes())
